package io.byteStream.output;
/*
jdk7版本之前Io流异常处理
 */
import java.io.FileOutputStream;
import java.io.IOException;

public class TryCatch1JDK7 {
    public static void main(String[] args) {
        FileOutputStream fos = null;
        try{
            System.out.println(1/0);
            fos = new FileOutputStream("E:\\javaFileTest\\a.txt");
            fos.write("钵钵鸡".getBytes());
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (fos != null) {
                try {
                    fos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }

        }
    }
}
